package test1021;

public class Student extends Person {
    private String studentId;
    private String enrollmentDate;

    public Student(String name, String gender, String studentId, String enrollmentDate) {
        name = super.name;
        this.name = name;
        gender = super.sex;
        this.sex = gender;
        this.studentId = studentId;
        this.enrollmentDate = enrollmentDate;
    }
    public void show() {
        super.displayInfo();
        System.out.println("学号：" + studentId);
        System.out.println("入学时间：" + enrollmentDate);
    }
}

